
#pragma once

#include "Material.h"
#include "libmesh/meshfree_interpolation.h"
using std::string;
using std::vector;

class Function;

class ReadRecessionVelocityMaterial : public Material
{
public:
	ReadRecessionVelocityMaterial(const InputParameters & parameters);

protected:
  virtual void computeProperties();

private:
  void readFile();
  void interpolate(std::vector<Real> &vnx, std::vector<Real>  &vny,  std::vector<Real>  &vnz,std::vector<Point> &pts, Real t);
  void check();
  MaterialProperty<Real> & _vnx;
  MaterialProperty<Real> & _vny;
  MaterialProperty<Real> & _vnz;
  string _data_file;
  vector<vector<Real> > _src_vnx;
  vector<vector<Real> > _src_vny;
  vector<vector<Real> > _src_vnz;
  vector<vector<Point> >_src_pts;
  vector<Real> _time_step;
  vector<string> _field_name;

  vector<InverseDistanceInterpolation<LIBMESH_DIM> *  > _idis;
  int _num_pts;
  int _num_time_step;
  std::vector<Real> _scale;
  Real _velocitycoff;

};

template<>
InputParameters validParams<ReadRecessionVelocityMaterial>();
